package controller;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JFrame;

import view.ViewCompetentiePanel;

public class ViewCompetentiePanelActions implements ActionListener {

	ViewCompetentiePanel sender;
	
	public ViewCompetentiePanelActions(ViewCompetentiePanel sender){
		this.sender = sender;
	}
	
	@Override
	public void actionPerformed(ActionEvent e) {
		if(e.getActionCommand().equals("btnSave")){
			sender.getCompetentie().setNaam(sender.getTxtNaam().getText());
			
			JFrame f = (JFrame) sender.getTopLevelAncestor();
			f.dispose();
		}
	}

}
